import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { i18n } from './config/i18n'
import { createPinia } from 'pinia'
import Vant from 'vant'
import 'vant/lib/index.css'

const app = createApp(App)
const pinia = createPinia()

// 初始化主题
const savedTheme = localStorage.getItem('theme') || 'light'
document.documentElement.setAttribute('data-theme', savedTheme)

app.use(Vant)
app.use(router)
app.use(i18n)
app.use(pinia)

app.mount('#app')